package com.cms.acase.lazyload

import com.alibaba.android.arouter.facade.annotation.Route
import com.android.baselibrary.base.BaseActivity
import com.cms.acase.R
import com.cms.acase.bean.CaseMainUtils
import com.cms.acase.databinding.ActivityLazyLoadBinding

@Route(path = CaseMainUtils.CASE_LAZY_LOAD)
class LazyLoadActivity :BaseActivity<ActivityLazyLoadBinding>(){

    private val tabs by lazy {
        listOf( "新闻","财经","流行","故事","听书","歌曲")
    }
    private val fragments by lazy {
        listOf(
            FirstFragment(),
            SecondFragment(),
            ThreeFragment(),
            ModeFragment(),
            ModeFragment(),
            ModeFragment(),
        )
    }
    override fun getLayoutId(): Int {
       return R.layout.activity_lazy_load
    }

    override fun initView() {
        mBinding.viewpage.adapter = LazyLoadPageFragmentAdapter(this,fragments,tabs)
        mBinding.tabLayout.setupWithViewPager(mBinding.viewpage)
    }

    override fun initListener() {
    }
}